<template>
	<div class="form">
		<page-info-title :title="$t('application.form.teamInfo')"></page-info-title>
		<div class="ipt1">
			<page-input :title="$t('application.form.teamName')" @message="(e) => { form.teamName = e }" :required="true"
				:placeholder="$t('application.form.enterTeamName')" :disabled="disabled"
				:history="oldParams.teamName || ''"></page-input>
			<page-input :title="$t('application.form.schoolName')" @message="(e) => { form.schoolName = e }" :required="true"
				:placeholder="$t('application.form.enterSchoolName')" :disabled="disabled"
				:history="oldParams.schoolName || ''"></page-input>
			<page-input :title="$t('application.form.conactEmail')" @message="(e) => { form.conactEmail = e }" :required="true"
				:placeholder="$t('application.form.enterConactEmail')" :disabled="disabled"
				:history="oldParams.conactEmail || ''"></page-input>
		</div>
		<div class="ipt2">
			<div class="ipt2-bar">
				<input-title :title="$t('application.form.competitionGrouping')" :required="true"></input-title>
				<div class="ipt2-line">
					<select-input class="t1" @message="track" :typeList="groupList" :required="true"
						:placeholder="$t('application.form.choose')" width="16rem" :disabled="disabled"
						:history="oldParams.competitionGrouping || ''"></select-input>
					<page-input class="ipt-input" @message="(e) => { form.receiveCompetition = e }"
						:history="oldParams.competitionGrouping" :placeholder="$t('application.form.notice')"></page-input>
				</div>
			</div>
			<div class="ipt2-bar">
				<input-title :title="$t('application.form.country')" :required="true"></input-title>
				<div class="ipt2-line">
					<select-input class="t2" @message="country" :typeList="countryList" :required="true"
						:placeholder="$t('application.form.choose')" width="16rem" :disabled="disabled"
						:history="oldParams.competitionGrouping || ''"></select-input>
					<page-input class="ipt-input" @message="(e) => { form.country = e }" :history="oldParams.country"
						:placeholder="$t('application.form.notice')"></page-input>
				</div>
			</div>
			<div class="ipt2-bar"></div>
		</div>
		<div class="ipt3">
			<input-table :disabled="disabled" @message="(e) => { form.memberParams = e }"
				:history="oldParams.memberParams || []"></input-table>
		</div>
	</div>
</template>

<script>

import pageInfoTitle from './page-info-title.vue'
import pageInput from './page-input.vue'
import pageInputTextarea from './page-input-textarea.vue'
import inputTable from './input-table.vue'
import { reactive } from 'vue'
import SelectInput from './select-input.vue'
import inputTitle from './input-title.vue'
export default {
	components: {
		pageInfoTitle,
		pageInput,
		pageInputTextarea,
		inputTable,
		SelectInput,
		inputTitle,
	},
	props: {
		disabled: {
			type: Boolean,
			default: false
		},
		oldParams: {
			type: [Array, Object],
			default: []
		}
	},

	setup() {
		const form = reactive({
			teamName: "",
			schoolName: "",
			competitionGrouping: "",
			country: "",
			conactEmail: "",
			memberParams: []
		})
		return {
			form
		}
	},

	mounted() {

		console.log(33333333333333333)

		for (const key in this.oldParams) {
			console.log(key, this.oldParams[key])
		}

	},

	methods: {

		competition(e) {
			this.form.competitionGrouping = e
		},

		track(e) {

			this.form.competitionGrouping = e.name

			console.log("track", this.form)
		},

		country(e) {

			this.form.country = e.name


			console.log("country", e)
		}
	},

	computed: {


		ind() {
			return (index) => {
				let num = ''
				if (index) {
					num = index.toString().padStart(2, '0')
				}
				return num
			}
		},
		groupList() {
			let num = []
			if (this.$i18n.locale === 'zh') {
				num = [
					{
						name: '白色——工业',
						value: '1'
					},
					{
						name: '绿色——农业、环境',
						value: '2'
					},
					{
						name: '红色——健康、医疗',
						value: '3'
					}
				]
			} else if (this.$i18n.locale === 'en') {
				num = [
					{
						name: 'White for industry ',
						value: '1'
					},
					{
						name: 'Green for Agriculture, Environment',
						value: '2'
					},
					{
						name: 'Red for Health, Medical treatment',
						value: '3'
					}
				]
			}

			return num
		},
		countryList() {
			let num = []
			if (this.$i18n.locale === 'zh') {
				num = [
					{ name: "中国 (China)", value: "86" },
					{ name: "中国香港 (Hong Kong)", value: "852" },
					{ name: "中国澳門 (Macau)", value: "853" },
					{ name: "中国台湾 (Taiwan)", value: "886" },
					{ name: "日本 (Japan)", value: "81" },
					{ name: "韩国 (South Korea)", value: "82" },
					{ name: "美国 (USA or Canada)", value: "1" },
					{ name: "阿富汗 (Afghanistan)", value: "93" },
					{ name: "阿尔巴尼亚 (Albania)", value: "355" },
					{ name: "阿尔及利亚 (Algeria)", value: "213" },
					{ name: "萨摩亚 (American Samoa)", value: "684" },
					{ name: "安道尔共和国 (Andorra)", value: "376" },
					{ name: "安哥拉 (Angola)", value: "244" },
					{ name: "安圭拉岛 (Anguilla)", value: "1264" },
					{ name: "南极洲 (Antarctica)", value: "672" },
					{ name: "安提瓜和巴布达 (Antigua and Barbuda)", value: "1268" },
					{ name: "阿根廷 (Argentina)", value: "54" },
					{ name: "亚美尼亚 (Armenia)", value: "374" },
					{ name: "阿鲁巴 (Aruba)", value: "297" },
					{ name: "澳大利亚 (Australia)", value: "61" },
					{ name: "奥地利 (Austria)", value: "43" },
					{ name: "阿塞拜疆 (Azerbaijan)", value: "994" },
					{ name: "巴哈马 (Bahamas)", value: "1242" },
					{ name: "巴林 (Bahrain)", value: "973" },
					{ name: "孟加拉国 (Bangladesh)", value: "880" },
					{ name: "巴巴多斯 (Barbados)", value: "1246" },
					{ name: "白俄罗斯 (Belarus)", value: "375" },
					{ name: "比利时 (Belgium)", value: "32" },
					{ name: "伯利兹城 (Belize)", value: "501" },
					{ name: "贝宁 (Benin)", value: "229" },
					{ name: "百慕大 (Bermuda)", value: "1441" },
					{ name: "不丹 (Bhutan)", value: "975" },
					{ name: "玻利维亚 (Bolivia)", value: "591" },
					{ name: "波斯尼亚和黑塞哥维那 (Bosnia and Herzegovina)", value: "387" },
					{ name: "博茨瓦纳 (Botswana)", value: "267" },
					{ name: "巴西 (Brazil)", value: "55" },
					{ name: "英属印度洋领地 (British Indian Ocean Territory)", value: "246" },
					{ name: "文莱达鲁萨兰国 (Brunei Darussalam)", value: "673" },
					{ name: "保加利亚 (Bulgaria)", value: "359" },
					{ name: "布基纳法索 (Burkina Faso)", value: "226" },
					{ name: "布隆迪 (Burundi)", value: "257" },
					{ name: "柬埔寨 (Cambodia)", value: "855" },
					{ name: "喀麦隆 (Cameroon)", value: "237" },
					{ name: "佛得角 (Cape Verde)", value: "238" },
					{ name: "开曼群岛 (Cayman Islands)", value: "1345" },
					{ name: "中非共和国 (Central African Republic)", value: "236" },
					{ name: "乍得 (Chad)", value: "235" },
					{ name: "智利 (Chile)", value: "56" },
					{ name: "圣延岛 (Christmas Island)", value: "61" },
					{ name: "科科斯群岛 (Cocos (Keeling) Islands)", value: "61" },
					{ name: "哥伦比亚(Colombia)", value: "57" },
					{ name: "科摩罗 (Comoros)", value: "269" },
					{ name: "刚果 (Congo)", value: "242" },
					{ name: "刚果民主共和国(Congo,The Democratic Republic Of The)", value: "243" },
					{ name: "库克群岛 (Cook Islands)", value: "682" },
					{ name: "哥斯达黎加 (Costa Rica)", value: "506" },
					{ name: "科特迪瓦 (Cote D Ivoire)", value: "225" },
					{ name: "克罗地亚 (Croatia)", value: "385" },
					{ name: "古巴 (Cuba)", value: "53" },
					{ name: "塞浦路斯 (Cyprus)", value: "357" },
					{ name: "捷克 (Czech Republic)", value: "420" },
					{ name: "丹麦 (Denmark)", value: "45" },
					{ name: "吉布提 (Djibouti)", value: "253" },
					{ name: "多米尼克国 (Dominica)", value: "1767" },
					{ name: "多米尼加共和国 (Dominican Republic)", value: "1849" },
					{ name: "东帝汶 (East Timor)", value: "670" },
					{ name: "厄瓜多尔 (Ecuador)", value: "593" },
					{ name: "埃及 (Egypt)", value: "20" },
					{ name: "萨尔瓦多 (El Salvador)", value: "503" },
					{ name: "赤道几内亚 (Equatorial Guinea)", value: "240" },
					{ name: "爱沙尼亚 (Estonia)", value: "372" },
					{ name: "埃塞俄比亚 (Ethiopia)", value: "251" },
					{ name: "福克兰群岛(Falkland Islands (Malvinas))", value: "500" },
					{ name: "法罗群岛 (Faroe Islands)", value: "298" },
					{ name: "斐济 (Fiji)", value: "679" },
					{ name: "芬兰 (Finland)", value: "358" },
					{ name: "法国 (France)", value: "33" },
					{ name: "法国大都会 (France Metropolitan)", value: "33" },
					{ name: "法属圭亚那 (French Guiana)", value: "594" },
					{ name: "法属玻里尼西亚 (French Polynesia)", value: "689" },
					{ name: "加蓬 (Gabon)", value: "241" },
					{ name: "冈比亚 (Gambia)", value: "220" },
					{ name: "格鲁吉亚 (Georgia)", value: "995" },
					{ name: "德国 (Germany)", value: "49" },
					{ name: "加纳 (Ghana)", value: "233" },
					{ name: "直布罗陀 (Gibraltar)", value: "350" },
					{ name: "希腊 (Greece)", value: "30" },
					{ name: "格陵兰 (Greenland)", value: "45" },
					{ name: "格林纳达 (Grenada)", value: "1473" },
					{ name: "瓜德罗普岛 (Guadeloupe)", value: "590" },
					{ name: "关岛 (Guam)", value: "1671" },
					{ name: "危地马拉 (Guatemala)", value: "502" },
					{ name: "几内亚 (Guinea)", value: "224" },
					{ name: "几内亚比绍 (Guinea-Bissau)", value: "245" },
					{ name: "圭亚那 (Guyana)", value: "592" },
					{ name: "海地 (Haiti)", value: "509" },
					{ name: "洪都拉斯 (Honduras)", value: "504" },
					{ name: "匈牙利 (Hungary)", value: "36" },
					{ name: "冰岛 (Iceland)", value: "354" },
					{ name: "印度 (India)", value: "91" },
					{ name: "印度尼西亚 (Indonesia)", value: "62" },
					{ name: "伊朗 (Iran (Islamic Republic of))", value: "98" },
					{ name: "伊拉克 (Iraq)", value: "964" },
					{ name: "爱尔兰 (Ireland)", value: "353" },
					{ name: "以色列 (Israel)", value: "972" },
					{ name: "意大利 (Italy)", value: "39" },
					{ name: "牙买加 (Jamaica)", value: "1876" },
					{ name: "约旦 (Jordan)", value: "962" },
					{ name: "哈萨克 (Kazakhstan)", value: "7" },
					{ name: "肯尼亚 (Kenya)", value: "254" },
					{ name: "科威特 (Kuwait)", value: "965" },
					{ name: "吉尔吉斯 (Kyrgyzstan)", value: "996" },
					{ name: "拉脱维亚 (Latvia)", value: "371" },
					{ name: "黎巴嫩 (Lebanon)", value: "961" },
					{ name: "莱索托 (Lesotho)", value: "266" },
					{ name: "利比里亚 (Liberia)", value: "231" },
					{ name: "利比亚 (Libyan Arab Jamahiriya)", value: "218" },
					{ name: "列支敦士登 (Liechtenstein)", value: "423" },
					{ name: "立陶宛 (Lithuania)", value: "370" },
					{ name: "卢森堡 (Luxembourg)", value: "352" },
					{ name: "马达加斯加 (Madagascar)", value: "261" },
					{ name: "马拉维 (Malawi)", value: "265" },
					{ name: "马来西亚 (Malaysia)", value: "60" },
					{ name: "马尔代夫 (Maldives)", value: "960" },
					{ name: "马里 (Mali)", value: "223" },
					{ name: "马尔他 (Malta)", value: "356" },
					{ name: "马提尼克岛 (Martinique)", value: "596" },
					{ name: "毛里塔尼亚 (Mauritania)", value: "222" },
					{ name: "毛里求斯(Mauritius)", value: "230" },
					{ name: "马约特 (Mayotte)", value: "262" },
					{ name: "墨西哥 (Mexico)", value: "52" },
					{ name: "密克罗尼西亚 (Micronesia)", value: "691" },
					{ name: "摩尔多瓦 (Moldova)", value: "373" },
					{ name: "摩纳哥 (Monaco)", value: "377" },
					{ name: "外蒙古 (Mongolia)", value: "976" },
					{ name: "黑山共和国 (Montenegro)", value: "382" },
					{ name: "蒙特塞拉特 (Montserrat)", value: "1664" },
					{ name: "摩洛哥 (Morocco)", value: "212" },
					{ name: "莫桑比克 (Mozambique)", value: "258" },
					{ name: "缅甸 (Myanmar)", value: "95" },
					{ name: "那米比亚 (Namibia)", value: "264" },
					{ name: "瑙鲁 (Nauru)", value: "674" },
					{ name: "尼泊尔 (Nepal)", value: "977" },
					{ name: "荷兰 (Netherlands)", value: "31" },
					{ name: "荷兰安的列斯群岛 (Netherlands Antilles)", value: "599" },
					{ name: "新喀里多尼亚 (New Caledonia)", value: "687" },
					{ name: "新西兰 (New Zealand)", value: "64" },
					{ name: "尼加拉瓜 (Nicaragua)", value: "505" },
					{ name: "尼日尔 (Niger)", value: "227" },
					{ name: "尼日利亚 (Nigeria)", value: "234" },
					{ name: "诺福克岛 (Norfolk Island)", value: "6723" },
					{ name: "朝鲜 (North Korea)", value: "850" },
					{ name: "北马里亚纳群岛 (Northern Mariana Islands)", value: "1670" },
					{ name: "挪威 (Norway)", value: "47" },
					{ name: "阿曼 (Oman)", value: "968" },
					{ name: "巴基斯坦 (Pakistan)", value: "92" },
					{ name: "帛琉 (Palau)", value: "680" },
					{ name: "巴勒斯坦 (Palestine)", value: "970" },
					{ name: "巴拿马 (Panama)", value: "507" },
					{ name: "巴布亚新几内亚 (Papua New Guinea)", value: "675" },
					{ name: "巴拉圭 (Paraguay)", value: "595" },
					{ name: "秘鲁 (Peru)", value: "51" },
					{ name: "菲律宾共和国 (Philippines)", value: "63" },
					{ name: "皮特凯恩岛 (Pitcairn)", value: "64" },
					{ name: "波兰 (Poland)", value: "48" },
					{ name: "葡萄牙 (Portugal)", value: "351" },
					{ name: "波多黎各 (Puerto Rico)", value: "1787" },
					{ name: "卡塔尔 (Qatar)", value: "974" },
					{ name: "留尼汪岛 (Reunion)", value: "262" },
					{ name: "罗马尼亚 (Romania)", value: "40" },
					{ name: "俄罗斯联邦 (Russian Federation)", value: "7" },
					{ name: "卢旺达 (Rwanda)", value: "250" },
					{ name: "美属萨摩亚 (Samoa)", value: "685" },
					{ name: "圣马力诺共和国 (San Marino)", value: "378" },
					{ name: "沙特阿拉伯 (Saudi Arabia)", value: "966" },
					{ name: "塞内加尔 (Senegal)", value: "221" },
					{ name: "塞尔维亚共和国 (Serbia)", value: "381" },
					{ name: "塞舌尔 (Seychelles)", value: "248" },
					{ name: "塞拉利昂 (Sierra Leone)", value: "232" },
					{ name: "新加坡 (Singapore)", value: "65" },
					{ name: "斯洛伐克 (Slovakia (Slovak Republic))", value: "421" },
					{ name: "斯洛文尼亚 (Slovenia)", value: "386" },
					{ name: "索罗门群岛 (Solomon Islands)", value: "677" },
					{ name: "索马里 (Somalia)", value: "252" },
					{ name: "南非 (South Africa)", value: "27" },
					{ name: "西班牙 (Spain)", value: "34" },
					{ name: "斯里兰卡 (Sri Lanka)", value: "94" },
					{ name: "苏丹 (Sudan)", value: "249" },
					{ name: "苏里南 (Suriname)", value: "597" },
					{ name: "斯威士兰 (Swaziland)", value: "268" },
					{ name: "瑞典 (Sweden)", value: "46" },
					{ name: "瑞士 (Switzerland)", value: "41" },
					{ name: "叙利亚 (Syrian Arab Republic)", value: "963" },
					{ name: "塔吉克 (Tajikistan)", value: "992" },
					{ name: "坦桑尼亚 (Tanzania)", value: "255" },
					{ name: "泰国 (Thailand)", value: "66" },
					{ name: "多哥 (Togo)", value: "228" },
					{ name: "汤加 (Tonga)", value: "676" },
					{ name: "特立尼达和多巴哥 (Trinidad and Tobago)", value: "1868" },
					{ name: "突尼斯 (Tunisia)", value: "216" },
					{ name: "土耳其 (Turkey)", value: "90" },
					{ name: "土库曼 (Turkmenistan)", value: "993" },
					{ name: "土克斯及开科斯群岛 (Turks and Caicos Islands)", value: "1809" },
					{ name: "乌干达 (Uganda)", value: "256" },
					{ name: "乌克兰 (Ukraine)", value: "380" },
					{ name: "阿拉伯联合酋长国 (United Arab Emirates)", value: "971" },
					{ name: "英国 (United Kingdom)", value: "44" },
					{ name: "乌拉圭 (Uruguay)", value: "598" },
					{ name: "乌兹别克斯坦 (Uzbekistan)", value: "998" },
					{ name: "瓦努阿图 (Vanuatu)", value: "678" },
					{ name: "梵蒂冈 (Vatican City State (Holy See))", value: "39" },
					{ name: "委内瑞拉 (Venezuela)", value: "58" },
					{ name: "越南 (Vietnam)", value: "84" },
					{ name: "维尔京群岛(英国) (Virgin Islands (British))", value: "1284" },
					{ name: "维尔京群岛(美国) (Virgin Islands (U.S.))", value: "1340" },
					{ name: "西撒哈拉 (Western Sahara)", value: "685" },
					{ name: "也门 (Yemen)", value: "967" },
					{ name: "南斯拉夫 (Yugoslavia)", value: "381" },
					{ name: "赞比亚 (Zambia)", value: "260" },
					{ name: "津巴布韦 (Zimbabwe)", value: "263" },
					{ name: "阿布哈兹 (the Republic of Abkhazia)", value: "7" },
					{ name: "南奥赛梯 (the Republic of South Ossetia)", value: "7" },
					{ name: "泽西岛 (Bailiwick of Jersey)", value: "44" },
					{ name: "老挝 (Lao People s Democratic Republic)", value: "856" },
					{ name: "马其顿 (The Republic of Macedonia)", value: "389" },
					{ name: "圣基茨和尼维斯(The Federation of Saint Kitts and Nevis)", value: "1869" },
					{ name: "圣卢西亚岛 (Santa Luzia Island)", value: "1758" },
					{ name: "圣文森特和格林纳丁斯(Saint Vincent and the Grenadines)", value: "1784" },
					{ name: "圣多美和普林西比 (Sao Tome and Principe)", value: "239" },
					{ name: "南苏丹共和国 (The Republic of South Sudan)", value: "211" }

				]
			} else if (this.$i18n.locale === 'en') {
				num = [
					{ name: "中国 (China)", value: "86" },
					{ name: "中国香港 (Hong Kong)", value: "852" },
					{ name: "中国澳門 (Macau)", value: "853" },
					{ name: "中国台湾 (Taiwan)", value: "886" },
					{ name: "日本 (Japan)", value: "81" },
					{ name: "韩国 (South Korea)", value: "82" },
					{ name: "美国 (USA or Canada)", value: "1" },
					{ name: "阿富汗 (Afghanistan)", value: "93" },
					{ name: "阿尔巴尼亚 (Albania)", value: "355" },
					{ name: "阿尔及利亚 (Algeria)", value: "213" },
					{ name: "萨摩亚 (American Samoa)", value: "684" },
					{ name: "安道尔共和国 (Andorra)", value: "376" },
					{ name: "安哥拉 (Angola)", value: "244" },
					{ name: "安圭拉岛 (Anguilla)", value: "1264" },
					{ name: "南极洲 (Antarctica)", value: "672" },
					{ name: "安提瓜和巴布达 (Antigua and Barbuda)", value: "1268" },
					{ name: "阿根廷 (Argentina)", value: "54" },
					{ name: "亚美尼亚 (Armenia)", value: "374" },
					{ name: "阿鲁巴 (Aruba)", value: "297" },
					{ name: "澳大利亚 (Australia)", value: "61" },
					{ name: "奥地利 (Austria)", value: "43" },
					{ name: "阿塞拜疆 (Azerbaijan)", value: "994" },
					{ name: "巴哈马 (Bahamas)", value: "1242" },
					{ name: "巴林 (Bahrain)", value: "973" },
					{ name: "孟加拉国 (Bangladesh)", value: "880" },
					{ name: "巴巴多斯 (Barbados)", value: "1246" },
					{ name: "白俄罗斯 (Belarus)", value: "375" },
					{ name: "比利时 (Belgium)", value: "32" },
					{ name: "伯利兹城 (Belize)", value: "501" },
					{ name: "贝宁 (Benin)", value: "229" },
					{ name: "百慕大 (Bermuda)", value: "1441" },
					{ name: "不丹 (Bhutan)", value: "975" },
					{ name: "玻利维亚 (Bolivia)", value: "591" },
					{ name: "波斯尼亚和黑塞哥维那 (Bosnia and Herzegovina)", value: "387" },
					{ name: "博茨瓦纳 (Botswana)", value: "267" },
					{ name: "巴西 (Brazil)", value: "55" },
					{ name: "英属印度洋领地 (British Indian Ocean Territory)", value: "246" },
					{ name: "文莱达鲁萨兰国 (Brunei Darussalam)", value: "673" },
					{ name: "保加利亚 (Bulgaria)", value: "359" },
					{ name: "布基纳法索 (Burkina Faso)", value: "226" },
					{ name: "布隆迪 (Burundi)", value: "257" },
					{ name: "柬埔寨 (Cambodia)", value: "855" },
					{ name: "喀麦隆 (Cameroon)", value: "237" },
					{ name: "佛得角 (Cape Verde)", value: "238" },
					{ name: "开曼群岛 (Cayman Islands)", value: "1345" },
					{ name: "中非共和国 (Central African Republic)", value: "236" },
					{ name: "乍得 (Chad)", value: "235" },
					{ name: "智利 (Chile)", value: "56" },
					{ name: "圣延岛 (Christmas Island)", value: "61" },
					{ name: "科科斯群岛 (Cocos (Keeling) Islands)", value: "61" },
					{ name: "哥伦比亚(Colombia)", value: "57" },
					{ name: "科摩罗 (Comoros)", value: "269" },
					{ name: "刚果 (Congo)", value: "242" },
					{ name: "刚果民主共和国(Congo,The Democratic Republic Of The)", value: "243" },
					{ name: "库克群岛 (Cook Islands)", value: "682" },
					{ name: "哥斯达黎加 (Costa Rica)", value: "506" },
					{ name: "科特迪瓦 (Cote D Ivoire)", value: "225" },
					{ name: "克罗地亚 (Croatia)", value: "385" },
					{ name: "古巴 (Cuba)", value: "53" },
					{ name: "塞浦路斯 (Cyprus)", value: "357" },
					{ name: "捷克 (Czech Republic)", value: "420" },
					{ name: "丹麦 (Denmark)", value: "45" },
					{ name: "吉布提 (Djibouti)", value: "253" },
					{ name: "多米尼克国 (Dominica)", value: "1767" },
					{ name: "多米尼加共和国 (Dominican Republic)", value: "1849" },
					{ name: "东帝汶 (East Timor)", value: "670" },
					{ name: "厄瓜多尔 (Ecuador)", value: "593" },
					{ name: "埃及 (Egypt)", value: "20" },
					{ name: "萨尔瓦多 (El Salvador)", value: "503" },
					{ name: "赤道几内亚 (Equatorial Guinea)", value: "240" },
					{ name: "爱沙尼亚 (Estonia)", value: "372" },
					{ name: "埃塞俄比亚 (Ethiopia)", value: "251" },
					{ name: "福克兰群岛(Falkland Islands (Malvinas))", value: "500" },
					{ name: "法罗群岛 (Faroe Islands)", value: "298" },
					{ name: "斐济 (Fiji)", value: "679" },
					{ name: "芬兰 (Finland)", value: "358" },
					{ name: "法国 (France)", value: "33" },
					{ name: "法国大都会 (France Metropolitan)", value: "33" },
					{ name: "法属圭亚那 (French Guiana)", value: "594" },
					{ name: "法属玻里尼西亚 (French Polynesia)", value: "689" },
					{ name: "加蓬 (Gabon)", value: "241" },
					{ name: "冈比亚 (Gambia)", value: "220" },
					{ name: "格鲁吉亚 (Georgia)", value: "995" },
					{ name: "德国 (Germany)", value: "49" },
					{ name: "加纳 (Ghana)", value: "233" },
					{ name: "直布罗陀 (Gibraltar)", value: "350" },
					{ name: "希腊 (Greece)", value: "30" },
					{ name: "格陵兰 (Greenland)", value: "45" },
					{ name: "格林纳达 (Grenada)", value: "1473" },
					{ name: "瓜德罗普岛 (Guadeloupe)", value: "590" },
					{ name: "关岛 (Guam)", value: "1671" },
					{ name: "危地马拉 (Guatemala)", value: "502" },
					{ name: "几内亚 (Guinea)", value: "224" },
					{ name: "几内亚比绍 (Guinea-Bissau)", value: "245" },
					{ name: "圭亚那 (Guyana)", value: "592" },
					{ name: "海地 (Haiti)", value: "509" },
					{ name: "洪都拉斯 (Honduras)", value: "504" },
					{ name: "匈牙利 (Hungary)", value: "36" },
					{ name: "冰岛 (Iceland)", value: "354" },
					{ name: "印度 (India)", value: "91" },
					{ name: "印度尼西亚 (Indonesia)", value: "62" },
					{ name: "伊朗 (Iran (Islamic Republic of))", value: "98" },
					{ name: "伊拉克 (Iraq)", value: "964" },
					{ name: "爱尔兰 (Ireland)", value: "353" },
					{ name: "以色列 (Israel)", value: "972" },
					{ name: "意大利 (Italy)", value: "39" },
					{ name: "牙买加 (Jamaica)", value: "1876" },
					{ name: "约旦 (Jordan)", value: "962" },
					{ name: "哈萨克 (Kazakhstan)", value: "7" },
					{ name: "肯尼亚 (Kenya)", value: "254" },
					{ name: "科威特 (Kuwait)", value: "965" },
					{ name: "吉尔吉斯 (Kyrgyzstan)", value: "996" },
					{ name: "拉脱维亚 (Latvia)", value: "371" },
					{ name: "黎巴嫩 (Lebanon)", value: "961" },
					{ name: "莱索托 (Lesotho)", value: "266" },
					{ name: "利比里亚 (Liberia)", value: "231" },
					{ name: "利比亚 (Libyan Arab Jamahiriya)", value: "218" },
					{ name: "列支敦士登 (Liechtenstein)", value: "423" },
					{ name: "立陶宛 (Lithuania)", value: "370" },
					{ name: "卢森堡 (Luxembourg)", value: "352" },
					{ name: "马达加斯加 (Madagascar)", value: "261" },
					{ name: "马拉维 (Malawi)", value: "265" },
					{ name: "马来西亚 (Malaysia)", value: "60" },
					{ name: "马尔代夫 (Maldives)", value: "960" },
					{ name: "马里 (Mali)", value: "223" },
					{ name: "马尔他 (Malta)", value: "356" },
					{ name: "马提尼克岛 (Martinique)", value: "596" },
					{ name: "毛里塔尼亚 (Mauritania)", value: "222" },
					{ name: "毛里求斯(Mauritius)", value: "230" },
					{ name: "马约特 (Mayotte)", value: "262" },
					{ name: "墨西哥 (Mexico)", value: "52" },
					{ name: "密克罗尼西亚 (Micronesia)", value: "691" },
					{ name: "摩尔多瓦 (Moldova)", value: "373" },
					{ name: "摩纳哥 (Monaco)", value: "377" },
					{ name: "外蒙古 (Mongolia)", value: "976" },
					{ name: "黑山共和国 (Montenegro)", value: "382" },
					{ name: "蒙特塞拉特 (Montserrat)", value: "1664" },
					{ name: "摩洛哥 (Morocco)", value: "212" },
					{ name: "莫桑比克 (Mozambique)", value: "258" },
					{ name: "缅甸 (Myanmar)", value: "95" },
					{ name: "那米比亚 (Namibia)", value: "264" },
					{ name: "瑙鲁 (Nauru)", value: "674" },
					{ name: "尼泊尔 (Nepal)", value: "977" },
					{ name: "荷兰 (Netherlands)", value: "31" },
					{ name: "荷兰安的列斯群岛 (Netherlands Antilles)", value: "599" },
					{ name: "新喀里多尼亚 (New Caledonia)", value: "687" },
					{ name: "新西兰 (New Zealand)", value: "64" },
					{ name: "尼加拉瓜 (Nicaragua)", value: "505" },
					{ name: "尼日尔 (Niger)", value: "227" },
					{ name: "尼日利亚 (Nigeria)", value: "234" },
					{ name: "诺福克岛 (Norfolk Island)", value: "6723" },
					{ name: "朝鲜 (North Korea)", value: "850" },
					{ name: "北马里亚纳群岛 (Northern Mariana Islands)", value: "1670" },
					{ name: "挪威 (Norway)", value: "47" },
					{ name: "阿曼 (Oman)", value: "968" },
					{ name: "巴基斯坦 (Pakistan)", value: "92" },
					{ name: "帛琉 (Palau)", value: "680" },
					{ name: "巴勒斯坦 (Palestine)", value: "970" },
					{ name: "巴拿马 (Panama)", value: "507" },
					{ name: "巴布亚新几内亚 (Papua New Guinea)", value: "675" },
					{ name: "巴拉圭 (Paraguay)", value: "595" },
					{ name: "秘鲁 (Peru)", value: "51" },
					{ name: "菲律宾共和国 (Philippines)", value: "63" },
					{ name: "皮特凯恩岛 (Pitcairn)", value: "64" },
					{ name: "波兰 (Poland)", value: "48" },
					{ name: "葡萄牙 (Portugal)", value: "351" },
					{ name: "波多黎各 (Puerto Rico)", value: "1787" },
					{ name: "卡塔尔 (Qatar)", value: "974" },
					{ name: "留尼汪岛 (Reunion)", value: "262" },
					{ name: "罗马尼亚 (Romania)", value: "40" },
					{ name: "俄罗斯联邦 (Russian Federation)", value: "7" },
					{ name: "卢旺达 (Rwanda)", value: "250" },
					{ name: "美属萨摩亚 (Samoa)", value: "685" },
					{ name: "圣马力诺共和国 (San Marino)", value: "378" },
					{ name: "沙特阿拉伯 (Saudi Arabia)", value: "966" },
					{ name: "塞内加尔 (Senegal)", value: "221" },
					{ name: "塞尔维亚共和国 (Serbia)", value: "381" },
					{ name: "塞舌尔 (Seychelles)", value: "248" },
					{ name: "塞拉利昂 (Sierra Leone)", value: "232" },
					{ name: "新加坡 (Singapore)", value: "65" },
					{ name: "斯洛伐克 (Slovakia (Slovak Republic))", value: "421" },
					{ name: "斯洛文尼亚 (Slovenia)", value: "386" },
					{ name: "索罗门群岛 (Solomon Islands)", value: "677" },
					{ name: "索马里 (Somalia)", value: "252" },
					{ name: "南非 (South Africa)", value: "27" },
					{ name: "西班牙 (Spain)", value: "34" },
					{ name: "斯里兰卡 (Sri Lanka)", value: "94" },
					{ name: "苏丹 (Sudan)", value: "249" },
					{ name: "苏里南 (Suriname)", value: "597" },
					{ name: "斯威士兰 (Swaziland)", value: "268" },
					{ name: "瑞典 (Sweden)", value: "46" },
					{ name: "瑞士 (Switzerland)", value: "41" },
					{ name: "叙利亚 (Syrian Arab Republic)", value: "963" },
					{ name: "塔吉克 (Tajikistan)", value: "992" },
					{ name: "坦桑尼亚 (Tanzania)", value: "255" },
					{ name: "泰国 (Thailand)", value: "66" },
					{ name: "多哥 (Togo)", value: "228" },
					{ name: "汤加 (Tonga)", value: "676" },
					{ name: "特立尼达和多巴哥 (Trinidad and Tobago)", value: "1868" },
					{ name: "突尼斯 (Tunisia)", value: "216" },
					{ name: "土耳其 (Turkey)", value: "90" },
					{ name: "土库曼 (Turkmenistan)", value: "993" },
					{ name: "土克斯及开科斯群岛 (Turks and Caicos Islands)", value: "1809" },
					{ name: "乌干达 (Uganda)", value: "256" },
					{ name: "乌克兰 (Ukraine)", value: "380" },
					{ name: "阿拉伯联合酋长国 (United Arab Emirates)", value: "971" },
					{ name: "英国 (United Kingdom)", value: "44" },
					{ name: "乌拉圭 (Uruguay)", value: "598" },
					{ name: "乌兹别克斯坦 (Uzbekistan)", value: "998" },
					{ name: "瓦努阿图 (Vanuatu)", value: "678" },
					{ name: "梵蒂冈 (Vatican City State (Holy See))", value: "39" },
					{ name: "委内瑞拉 (Venezuela)", value: "58" },
					{ name: "越南 (Vietnam)", value: "84" },
					{ name: "维尔京群岛(英国) (Virgin Islands (British))", value: "1284" },
					{ name: "维尔京群岛(美国) (Virgin Islands (U.S.))", value: "1340" },
					{ name: "西撒哈拉 (Western Sahara)", value: "685" },
					{ name: "也门 (Yemen)", value: "967" },
					{ name: "南斯拉夫 (Yugoslavia)", value: "381" },
					{ name: "赞比亚 (Zambia)", value: "260" },
					{ name: "津巴布韦 (Zimbabwe)", value: "263" },
					{ name: "阿布哈兹 (the Republic of Abkhazia)", value: "7" },
					{ name: "南奥赛梯 (the Republic of South Ossetia)", value: "7" },
					{ name: "泽西岛 (Bailiwick of Jersey)", value: "44" },
					{ name: "老挝 (Lao People s Democratic Republic)", value: "856" },
					{ name: "马其顿 (The Republic of Macedonia)", value: "389" },
					{ name: "圣基茨和尼维斯(The Federation of Saint Kitts and Nevis)", value: "1869" },
					{ name: "圣卢西亚岛 (Santa Luzia Island)", value: "1758" },
					{ name: "圣文森特和格林纳丁斯(Saint Vincent and the Grenadines)", value: "1784" },
					{ name: "圣多美和普林西比 (Sao Tome and Principe)", value: "239" },
					{ name: "南苏丹共和国 (The Republic of South Sudan)", value: "211" }

				]
			}

			return num
		}
	},
	watch: {
		form: {
			deep: true, // 开启深度监听
			handler(newVal, oldVal) {
				this.$emit("message", newVal)
			}
		},
		history: {
			deep: true,
			handler(newVal, oldVal) {
				if (newVal.length > 0) {
					this.form = newVal
				}
				this.$emit("message", newVal)
			}
		}
	}
}
</script>


<style lang="less" scoped>
.form {
	padding: 0.64rem 1.49rem;
	background: rgba(253, 253, 254, 0.25);
	border: 0.05rem solid #FFFFFF;
	backdrop-filter: blur(10px);
}

.ipt1 {
	display: flex;
	align-items: center;
	margin-bottom: 0.64rem;
}

.ipt2 {
	display: flex;
	margin-bottom: 0.86rem;

	.ipt2-bar {
		flex: 1;
	}

	.ipt2-line {
		display: flex;

		.t1,
		.t2 {
			width: 2.8rem !important;
			min-width: 2.8rem !important;
			border-bottom: 0.03rem solid #C5C5CA;
			margin-top: -1px;

			&::after {
				right: 0.4rem;
			}
		}
	}

	.t1 {
		width: 100%;
		height: 100%;

	}

	.t2 {
		width: 100%;
		height: 100%;
	}

}
</style>